cmake_minimum_required(VERSION 3.9)
project(aoa_proxy)
 
 
#设定编译参数
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE "Debug")
 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}  -Wl,-rpath=../lib")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")

IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
    set(TARGET_ARCH "x86")
endif()


#设定源码列表.cpp
file(GLOB SOURCE_FILES *.c)

#设定头文件路径
include_directories(.)
#include_directories("路径1"  “路径2”...)
 
 
 
#生成可执行文件
add_executable(${PROJECT_NAME}   ${SOURCE_FILES} )
#比如：add_executable(hello_world    ${SOURCE_FILES})
 
 
target_link_libraries(${PROJECT_NAME}  pthread usb-1.0)#就是g++ 编译选项中-l后的内容，不要有多余空格
